package com.itheima.fanxing;

import com.itheima.domain.Student;

import java.util.ArrayList;

/*
自定义 泛型方法
 */
public class Demo04 {

    public static void main(String[] args) {
        Student student = new Student();
        sing(student);

        sing("abc");
        dance(123,10.5);

        ArrayList<Integer> rap = rap(123, 456, 789);
        System.out.println(rap);

    }


    public static <T> void sing(T t){
        System.out.println(t);
    }

    public static <T,V> void dance(T t,V v){
        System.out.println(t);
        System.out.println(v);
    }
    public static <E> ArrayList<E> rap(E e1,E e2,E e3){
        ArrayList<E> es = new ArrayList<>();
        es.add(e1);
        es.add(e2);
        es.add(e3);
        return es;
    }
}
